import type { ProfileDetail, changeUserInfo } from '@/types/userInfo'
import { http } from '@/utils/http/http'

/**获取个人信息 */
export const getUserInfoApi = () => {
  return http<ProfileDetail>({
    method: 'GET',
    url: '/member/profile',
  })
}

/*** 修改个人信息 **/
export const changeUserInfoApi = (data: changeUserInfo) => {
  return http<ProfileDetail>({
    method: 'PUT',
    url: '/member/profile',
    data,
  })
}
